/*
 * @Description: 
 * @Author: cy2020
 * @Date: 2022-02-25 18:11:02
 * @LastEditTime: 2022-02-25 20:09:51
 */
let resolve = require('rollup-plugin-node-resolve')
let babel = require('rollup-plugin-babel')
let npm = require('rollup-plugin-node-resolve')
let json = require('rollup-plugin-json')
let commonjs = require('rollup-plugin-commonjs')
let mqtt = require('mqtt')

export default {
    input: 'src/iot.js',
    output: {
        file: 'dist/bundle.js',
        name: 'zksy-sdk',
        format: 'umd',
        globals: {
            mqtt: 'mqtt'
        }
    },
    external:['mqtt'],
    plugins: [
        resolve(),
        json(),
        mqtt,
        commonjs(),
        npm({ jsnext: true, main: true }),
        babel({
            exclude: 'node_modules/**'
        })
    ]
}